<template>
    <div>
      <p>路由的跳转方式</p>
      <!--  -->
      <!-- <div>
        <router-link :to="{name: 'Home'}" style="margin-right: 10px;">主页</router-link>
        <router-link :to="{name: 'Login'}">登录</router-link>
        
      </div> -->
      <!-- 编程式导航 -->
      <div>
        <button @click="toPage('orbitControls')">轨道控制器</button>
        <button @click="toPage('axesHelper')">辅助坐标轴</button>
      </div>
      <router-view></router-view>
    </div>
</template>
  
<script setup>
  import { useRouter } from 'vue-router'
  const router = useRouter();
  const toPage = (url) =>{
    router.push({
      name: url
    })
  }
</script>
  
<style>
  
</style>